"""
Dynmode.py --

This file implements the Dynamic mode window.

Date of creation: 2010-15-11

Copyright
Julian David Colorado, jd.colorado@upm.es
Universidad Politecnica de Madrid

See the file "license.terms" for information on usage and redistribution of this file, and for a
DISCLAIMER OF ALL WARRANTIES.

"""

import wx
#import os, sys
#from wx.py import shell, editor

class DynModeWindow( wx.Panel ):
	""" Window where the dynamic model description is displayed"""
	def __init__(self, parent, id ):
		""" Right upper window"""
		wx.Panel.__init__(self, parent, id )
		self.Sizer = wx.BoxSizer( wx.VERTICAL )
		self.Title = wx.StaticText( self, -1, "Bat Dynamic Model Description", (0,0), style=wx.TE_LEFT )
		font = wx.Font(10, wx.ROMAN, wx.NORMAL, wx.BOLD)
		self.Title.SetFont( font )

		self.Scroll = DynModeScroll(self, -1, wx.Point(0, 0), wx.Size(180, 100) )
		self.Sizer.Add(self.Title, 0, wx.EXPAND | wx.TOP | wx.BOTTOM, 4)
		self.Sizer.Add(self.Scroll, 1, wx.EXPAND | wx.TOP )
		self.SetSizer(self.Sizer)

class DynModeScroll( wx.ScrolledWindow ):
	"""Main frame holding the Dynamic Mode scroll."""
	def __init__(self, parent, id, pos, size ):
		"""Creates the main scroll frame, the graphical description window."""
		wx.ScrolledWindow.__init__(self, parent, id, pos, size, style=wx.SUNKEN_BORDER )

		# Set the scrolling rate; use same value in both horizontal and vertical directions.
		scrollRate = 5
		self.SetScrollRate(scrollRate, scrollRate)
		self.SetBackgroundColour("white")
		self.SetScrollbars(20,20,30,30)

	def SetImgDesc( self, systemtype):
		"""It changes de image description according to system's type"""
		self.bmp = wx.Image('interface/images/bat_model.png',wx.BITMAP_TYPE_PNG).ConvertToBitmap()
		wx.StaticBitmap( self, -1, self.bmp )

		self.Refresh()















